import moment, {now} from 'moment/moment';
// 数据库表
export const DiarySchame = {
  name: 'Diary',
  primaryKey: 'uid', // 定义主键后，无法创建同一主键的数据
  properties: {
    uid: 'string',
    title: {type: 'string', default: ''}, // {type: 'string'} 的简写
    body: {type: 'string', default: ''},
    mood: {type: 'int', default: 1},
    createTime: {type: 'date', default: new Date(moment().format())},
    createDate: {
      type: 'string',
      default: moment().format('YYYY-MM-DD HH:mm:ss'),
    },
  },
};
